Polymer precursors for Si(N)OC ceramics have been synthesized by hydrosilylation reaction of polyhydridomethylsiloxane (PHMS) with three different nitrogen containing compounds. The results obtained by combining characterization techniques such as FTIR, 13C- and 29Si-NMR confirm the occurrence of the cross-linking reaction between Si–H and vinyl groups. The structural characterization of the corresponding ceramic phase shows that the type of N-containing compounds strongly influences the pyrolytic transformation as well as the crystallization behavior of the final ceramics. Elemental analysis clearly indicates that N is present in the Si(N)OC matrix and the degree of N retention after pyrolysis is related to the type of N-containing starting compound. XPS data show that N–C bonds are present in the Si(N)OC ceramic samples even if only N–Si bonds are present in the starting N-containing precursors. However, if nitrogen atoms form bonds with sp2 carbon atoms in the preceramic polymer then a larger fraction of C–N bonds is retained in the final Si(N)OC ceramic.